<%- include header.ejs%>
<script src="https://cdn.bootcss.com/bootstrap-confirmation/1.0.0/bootstrap-confirmation.js"></script>
<link  href="/stylesheets/file.css" rel="stylesheet" />
<script type="text/javascript">
 $(function () {
     $('.confirmation').confirmation({
         animation:true,
         placement: 'top',
         title:'确定删除吗?',
         btnOkLabel:'取消',
         btnCancelLabel:'确定',
         btnOkClass:' btn btn-default btn-sm',
         btnCancelClass:'btn btn-primary btn-sm'
     });
     $('tr').mouseover(function () {
         $(this).find('button').css('visibility','visible');
     }).mouseout(function () {
         $(this).find('button').css('visibility','hidden');
     })
 })
</script>
    <div>
        <table class="table table-hover">
            <thead style="font-size: 18px">
                <th>标题</th>
                <th>编辑者</th>
                <th>保存时间</th>
            </thead>
            <tbody>
            <% for(var i=0;i<minds.length;i++){%>
            <tr>
                <td><%= minds[i].title%></td>
                <td><%= minds[i].editor%></td>
                <td><%= minds[i].time%></td>
                <td>
                    <a href="/mind/load?id=<%=minds[i]._id%>"><button class="btn btn-success btn-sm" style="visibility: hidden">编辑</button></a>
                    <a href="/mind/remove?id=<%=minds[i]._id%>"><button class="btn btn-danger btn-sm confirmation" style="visibility: hidden">删除</button></a>
                </td>
            </tr>
            <% } %>
            </tbody>
        </table>
    </div>



<%- include footer.ejs%>